﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace EncomiendaMVC.Models.Binders
{
    
    public class GuiaCustom : IModelBinder
    {
        public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
        {
            HttpRequestBase request = controllerContext.HttpContext.Request;

            string nombre = request.Form.Get("fArchivo");

            return new Guia
            {
                File = nombre
            };
        }
    } 

}